package com.lnsf.bookstore.web.address.vo;

import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

public class ApiAddress implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 用户外键
     */
    private Integer userId;

    /**
     * 收货人
     */
    private String receivername;

    /**
     * 电话号码
     */
    private String phone;

    /**
     * 省份
     */
    private String province;

    /**
     * 城市
     */
    private String city;

    /**
     * 区
     */
    private String area;

    /**
     * 街道等具体地名
     */
    private String street;

    /**
     * 邮政编码
     */
    private String code;

    /**
     * 默认
     */
    private Integer checked;

    /**
     * 三级联动地址字符串
     */
    private String areaInfo;
    private String areaInfoCode;
    private String provinceName;
    private String cityName;
    private String areaName;

    public String getAreaInfo() {
        if (StringUtils.isEmpty(areaInfo)) {
            areaInfo = getProvinceName() + getCityName() + getAreaName();
        }
        return areaInfo;
    }

    public void setAreaInfo(String areaInfo) {
        this.areaInfo = areaInfo;
    }

    public String getAreaInfoCode() {
        return areaInfoCode;
    }

    public void setAreaInfoCode(String areaInfoCode) {
        this.areaInfoCode = areaInfoCode;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    /**
     * bs_address
     */
    private static final long serialVersionUID = 1L;

    /**
     * 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 用户外键
     * @return userId 用户外键
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 用户外键
     * @param userId 用户外键
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 收货人
     * @return receivername 收货人
     */
    public String getReceivername() {
        return receivername;
    }

    /**
     * 收货人
     * @param receivername 收货人
     */
    public void setReceivername(String receivername) {
        this.receivername = receivername;
    }

    /**
     * 电话号码
     * @return phone 电话号码
     */
    public String getPhone() {
        return phone;
    }

    /**
     * 电话号码
     * @param phone 电话号码
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * 省份
     * @return province 省份
     */
    public String getProvince() {
        return province;
    }

    /**
     * 省份
     * @param province 省份
     */
    public void setProvince(String province) {
        this.province = province;
    }

    /**
     * 城市
     * @return city 城市
     */
    public String getCity() {
        return city;
    }

    /**
     * 城市
     * @param city 城市
     */
    public void setCity(String city) {
        this.city = city;
    }

    /**
     * 区
     * @return area 区
     */
    public String getArea() {
        return area;
    }

    /**
     * 区
     * @param area 区
     */
    public void setArea(String area) {
        this.area = area;
    }

    /**
     * 街道等具体地名
     * @return street 街道等具体地名
     */
    public String getStreet() {
        return street;
    }

    /**
     * 街道等具体地名
     * @param street 街道等具体地名
     */
    public void setStreet(String street) {
        this.street = street;
    }

    /**
     * 邮政编码
     * @return code 邮政编码
     */
    public String getCode() {
        return code;
    }

    /**
     * 邮政编码
     * @param code 邮政编码
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * 默认
     * @return checked 默认
     */
    public Integer getChecked() {
        return checked;
    }

    /**
     * 默认
     * @param checked 默认
     */
    public void setChecked(Integer checked) {
        this.checked = checked;
    }
}